package com.bw.day03.room

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query

@Dao
interface RecordDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insert(record: Record)
    @Delete
    fun delete(record: Record)
    @Query("delete from record where phone=:phone")
    fun deleteAll(phone:String)
    @Query("select * from record where phone=:phone")
    fun queryAll(phone: String):MutableList<Record>

}